﻿using Swimj.CommonLib.Controls;

namespace Swimj.CommonLib.Attributes
{
    [AttributeUsage(AttributeTargets.Property)]
    public class SelectColumnAttribute : FormColumnAttribute
    {
        public Type? SelectDataSource { get; set; }

        public string? SelectRemoteUrl { get; set; }

        public override IControl GetControl()
        {
            return new SelectControl()
            {
                SelectDataSource = SelectDataSource,
                SelectRemoteUrl = SelectRemoteUrl
            };
        }
    }
}